<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>行业复核</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/dbdialog/lhgdialog.js"></script>
	<script type="text/javascript" src="<%=path%>/js/table_span.js"></script>
	<script type="text/javascript" src="<%=path%>/js/check_jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/js/My97DatePicker/WdatePicker.js" defer="defer"></script><base target="_self" />
	<script type="text/javascript">	
		function doSelect(obj1,obj2,objId){
			if(document.getElementById(obj1).checked){
				$("#"+obj2).attr("checked",false);
				var tem = $("#"+obj1).val();
				var temArry = tem.split(',');
				$("#checks_"+objId).val(temArry[1]);
			}
		}		
		function funSave(m){
			var tf = false ;
			var tf1 = false ;
			var tf2 = false ;
			var id = '${apply.id }';
			$("#isSubmit").val(m);
			if(m==1){
				
			}else if(m==2){
				$("input[id^=checks_]").each(function(i){//数字为必填项
					if($(this).val() == '' || $(this).val() == null ){
						tf = true ;
						$("#tr_"+i).attr("style","background:#b90000");
						$("#"+i+"_1").focus() ;
						return false;
					}
				});
				if(tf){
					$(".link_input").attr('disabled',false);
					alert('初审结果有未填写项！');
					return false;
				}
			}
		}
	</script>
  </head>
  
  <body onload="_w_table_lefttitle_rowspan('#mytable','1','1');">
	<div  class="body-box">
		<div class="map">
			<div class="map_con">
				您当前的位置：分级评定 &gt; 县(市、区)、开发区安委办直接确认企业级别
			</div>
		</div>
		<div id="container">
			<table border="0" cellpadding="0" cellspacing="0" class="mytable">
				<tr><td><font color="red">注意：所有项必须全部填写</font></td></tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" class="mytable" align="center" style="width: 80%;float: none;">
				<tr>
					<td style="text-align: center;">企业自评结果：</td>
					<td style="text-align: center;">总项数：${apply.zpHgNum+apply.zpBhgNum+apply.zpBsjNum }</td>
					<td style="text-align: center;">合格项：${apply.zpHgNum }</td>
					<td style="text-align: center;">不合格项：${apply.zpBhgNum }</td>
					<td style="text-align: center;">不涉及项：${apply.zpBsjNum }</td>
					<td style="text-align: center;">得分：${apply.zpScore }</td>
					<td style="text-align: center;">级别：${apply.zpGrade }</td>
				</tr>
				<tr>
					<td style="text-align: center;">县(市、区)、开发区行业初审结果：</td>
					<td style="text-align: center;">总项数：${apply.sdHgNum+apply.sdBhgNum+apply.sdBsjNum }</td>
					<td style="text-align: center;">合格项：${apply.sdHgNum }</td>
					<td style="text-align: center;">不合格项：${apply.sdBhgNum }</td>
					<td style="text-align: center;">不涉及项：${apply.sdBsjNum }</td>
					<td style="text-align: center;">得分：${apply.sdScore }</td>
					<td style="text-align: center;">级别：${apply.sdGrade }</td>
				</tr>
			</table>
			<form action="<%=basePath%>/fjpd/_qabAuditSave.action" name="sdForm" method="post">
		    	<table border="0" cellpadding="0" cellspacing="0" class="mytable" id="mytable">
						<thead>
					    	<tr class="fixedHeaderTr">
					     		<th width="20%">类别</th>
		    					<th width="30%">审核项目</th>
		    					<th width="40%">核查结果说明</th>
								<th width="10%">评定结果</th>
					    	</tr>
				   		</thead>
					   	<tbody>
						<s:if test="%{objList.size>0}">
						  	<s:iterator id="obj" value="objList" status="x">
						  		<tr id="tr_${x.index }">
									<td align="center">${obj.parentName }</td>
									<td align="center">${obj.bzhName }</td>
									<td align="center"><textarea rows="2" cols="40" name="checkMsg">${obj.checkMsg }</textarea> </td>
									<td>
										<s:if test="%{#obj.checkAudit==1}">
											<input type="checkbox" name="hyHg"   id="${x.index }_1"  value="${obj.id },1" onclick="doSelect('${x.index }_1','${x.index }_2','${x.index }');" checked="checked">合&nbsp;&nbsp;&nbsp;&nbsp;格<br>
								    		<input type="checkbox" name="hyBhg" id="${x.index }_2"  value="${obj.id },0" onclick="doSelect('${x.index }_2','${x.index }_1','${x.index }');">不合格<br>
										</s:if>
										<s:elseif test="%{#obj.checkAudit==0}">
											<input type="checkbox" name="hyHg"   id="${x.index }_1"  value="${obj.id },1" onclick="doSelect('${x.index }_1','${x.index }_2','${x.index }');">合&nbsp;&nbsp;&nbsp;&nbsp;格<br>
								    		<input type="checkbox" name="hyBhg" id="${x.index }_2"  value="${obj.id },0" onclick="doSelect('${x.index }_2','${x.index }_1','${x.index }');" checked="checked">不合格<br>
										</s:elseif>
										<s:else>
											<input type="checkbox" name="hyHg"   id="${x.index }_1"  value="${obj.id },1" onclick="doSelect('${x.index }_1','${x.index }_2','${x.index }');">合&nbsp;&nbsp;&nbsp;&nbsp;格<br>
								    		<input type="checkbox" name="hyBhg" id="${x.index }_2"  value="${obj.id },0" onclick="doSelect('${x.index }_2','${x.index }_1','${x.index }');">不合格<br>
										</s:else>
										<input type="hidden" name="itemIds" id="itemId_${x.index }" value="${obj.id }">
										<input type="hidden" name="itemChecks" id="checks_${x.index}" value="${obj.checkAudit }">
									</td>
								</tr>
						  	</s:iterator>
						  	<tr>
						  		<td colspan="4" style="color: red">
							  		注意：<br>
							  		1、红橙黄三色表示存在审核项目情况，绿色表示没有审核项目情况。<br>
									2、有红色警示项或2项以上橙色项的直接定为D级；有一项橙色警示项或3项以上黄色警示项的定为C级；有1-2项黄色警示项的下浮一个级别。
						  		</td>
						  	</tr>
						</s:if>
					</tbody>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" class="mytable" id="mytable">
					<tr>
						<td align="left" width="35%">
							复核人员1：<input type="text" name="hyPer1" value="${apply.hyPer1}" id="bit1"><label class="note4">*</label>
						</td>
						<td align="left" width="35%">
							联系方式1：<input type="text" name="hyPer1Tel" value="${apply.hyPer1Tel}" id="bit2"><label class="note4">*</label>
						</td>
						<td align="left" rowspan="2" valign="middle">
							复核时间：<input name="hyDate" type="text" class="Wdate" value="<s:date name="%{apply.hyDate}" format="yyyy-MM-dd"/>" onclick="WdatePicker({readOnly:true})" id="byear1" ><label class="note4">*</label>
						</td>
					</tr>	
					<tr>
						<td align="left" colspan="1">
							复核人员2：<input type="text" name="hyPer2" value="${apply.hyPer2}" id="bit3"><label class="note4">*</label>
						</td>
						<td align="left" colspan="1">
							联系方式2：<input type="text" name="hyPer2Tel" value="${apply.hyPer2Tel}" id="bit4"><label class="note4">*</label>
						</td>
					</tr>	
					<tr>
						<td align="center" colspan="3">
							<center>
								<input type="submit" name="btntj2" class="link_input" id="btnSubmit2" value="保 存" title="结果暂存" onclick="funSave('1')"/> 
								<input type="submit" name="btntj2" class="link_input" id="btnSubmit2" value="提 交" title="复核完成，提交" onclick="funSave('2')"/> 
								<input type="button" name="btntj4" class="link_input" id="btnSubmit4" value="返 回" onclick="window.location.href='<%=basePath %>/fjpd/_qabList.action?${urls }&num=${num }&size=${size }'"/> 
							</center>
						</td>
					</tr>
				</table>
				<input type="hidden" name="objId" value="${apply.id }">
				<input type="hidden" name="isSubmit" id="isSubmit" value="">
				<input type="hidden" name="num" value="${num }">
				<input type="hidden" name="size" value="${size }">
				<input type="hidden" name="urls" value="${urls }">
			</form>
		</div>
	</div>
	<form action="<%=basePath %>/fjpd/_qabList.action?search=1" name="form1" method="post">
		<input type="hidden" name="urls" value="${urls }">
		<input type="hidden" name="num" value="${num }">
		<input type="hidden" name="size" value="${size }">
	</form>
  </body>
  <s:if test="%{tip!=null}">
    	<script>
    		alert('${tip}');
    	</script>
    </s:if>
</html>
